package com.wing.cabinet.model.response;

import com.wing.cabinet.model.entity.CellInventoryInout;
import com.wing.cabinet.utils.ExcelExport;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.cabinet.model.entity.UseInventoryInout;

/**
 * 售刀柜领取/暂存柜上/暂存/维修/回收VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class UseInventoryInoutVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @ExcelExport(value = "报失时间",sort = 110)
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    @ExcelExport(value = "报失人",sort = 100)
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 存/取刀任务编号
     */
    @ExcelExport(value = "报失单号", sort = 50)
    private String code;

    /**
     * 售刀柜领取/暂存柜上/暂存/维修/回收业务id
     */
    private Long businessId;

    /**
     * 操作类型
     */
    @ExcelExport(value = "类型",sort = 90,kv = "loss-报失")
    private UseInventoryInout.Type type;

    /**
    * 操作类型描述
    */
    @TableField(exist = false)
    private String typeDesc;

    public String getTypeDesc() {
        return type.getDesc();
    }

    /**
     * 状态:
     */
    private UseInventoryInout.Status status;

    /**
     * no
     */
    private Integer no;

    /**
     * day
     */
    private Integer day;

    private UseInventoryInout.BusinessType businessType;

    /**
     * 设备编号
     */
    private String deviceCode;

    /**
     * 上货/领取id
     */
    private Long inoutId;

    /**
     * 柜子id
     */
    private Long cabId;

    /**
     * sku id
     */
    private Long skuId;

    /**
     * 数量
     */
    @ExcelExport(value = "数量(包装计)", sort = 60)
    private Integer quantity;

    /**
     * 企业id
     */
    private Long companyId;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 货道id
     */
    private Long spaceId;


    /**
     * sku code
     */
    @ExcelExport(value = "物料编码", sort = 20)
    private String skuCode;

    /**
     * 柜子编码
     */
    private String cabCode;


    /**
     * 货道
     */
    private String spaceCode;

    /**
     * 当前库存
     */
    private Integer quantityCurrent;

    /**
     * 变动后库存
     */
    private Integer quantityAfter;

    /**
     * 产品SKU名称
     */
    @ExcelExport(value = "物料名称", sort = 10)
    private String skuName;

    /**
     * 产品规格
     */
    private String skuSpec;



    /**
     * sku 图片
     */
    private String skuPic;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 产品类型名称
     */
    private String productTypeName;

    /**
     * 产品分类名称
     */
    private String productCategoryName;

    /**
     * 产品品牌
     */
    @ExcelExport(value = "品牌", sort = 40)
    private String productBrandName;

    /**
     * 产品型号
     */
    private String productModelName;

    /**
     * 适配机床
     */
    private String deviceName;

    /**
     * 市场价
     */
    @ExcelExport(value = "市场价", sort = 80)
    private BigDecimal marketPrice;

    private Integer quantityMax;

    /**
     * 单位
     */
    @ExcelExport(value = "包装单位", sort = 61)
    private String unitName;

    /**
     * 是否形成账单
     */
    private CellInventoryInout.IsBill isBill;

    /**
     * 领用订单内所有产品的总价值
     */
    @TableField(exist = false)
    private BigDecimal money;
    private Long receiveLoadId;


    private String orderCode;
    /**
     * 备注
     */
    private String remark;
    @ExcelExport(value = "规格码", sort = 30)
    private String skuSpecOld;

    private Long inoutDetailId;

    private Long storageInventoryInoutId;

    private Long workOrderId;

    /**
     * 企业编码
     */
    private String enterpriseCode;


    private BigDecimal total;

    private Long processId;

    private String roleName;
    @ExcelExport(value = "部门", sort = 51)
    private String departmentName;
    @ExcelExport(value = "基础单位", sort = 70)
    private String basicsUnitName;

    private Long departmentId;
    @ExcelExport(value = "成本中心", sort = 52)
    private String costCenter;
    @ExcelExport(value = "数量(基础单位计)", sort = 62)
    private Integer quantityPack;
    @ExcelExport(value = "包装规格", sort = 53)
    private String  packName;

}
